
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from social import views

#dajaxice
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

urlpatterns = patterns('',
    #homepage of guest and member of the site: domain.com
    url(r'^$', include('social.urls', namespace="social")),

    #admin page :domain.com/admin
    url(r'^admin/$', include(admin.site.urls)),


    #logout URL: domain.com/logout
    url(r'^logout/$', 'django.contrib.auth.views.logout',
                          {'next_page': '/'}),

    #ajax requests in ajax app
    url(r'^ajax/$', include('ajax.urls', namespace="ajax")),



    #see the profile of members in the public (with privileges ):domain.com/firstName.lastName
    url(r'^(?P<first_name>\w+).(?P<last_name>\w+)(.)?(?P<queueNumber>\d+)?/$', views.nameDetailIndex, name="FLSocial"),

    #same but with user_id:domain.com/10052
    url(r'^(?P<user_id>\d+)/$', views.idDetailIndex, name="IDSocial"),

    #ajax for django with dajaxice
    url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),

)

urlpatterns += staticfiles_urlpatterns()